Tutorial for Mesh Edit v0.3

Introduction

MeshEdit is a modelling tool for Unity that lets you create and texture 3D meshes entirely inside the scene!
MeshEdit lets you: To help you get started, this tutorial will showcase the various features of the tool and show you how to use them to create beautiful assets for your game.

Including the MeshEdit UnityPackage

  1. Unzip the MeshEdit.zip file and move the file "MeshEdit.unitypackage" to a convenient place.
  2. Open the Unity project you'd like to use MeshEdit with, then use the menu on the top row and click "Assets>Import Package>Custom Package..."
  3. Using the "Import package" interface, open the "MeshEdit.unitypackage" from where you saved it.
MeshEdit is now ready-to-go, nice!

Creating your first mesh

Now that you've added MeshEdit to your project, you'll find some new options in the GameObject menu, and in the Heirarchy tab.
  1. Using the menu, click "GameObject>MeshEdit>Create Custom Mesh"
    OR
    Using the heirarchy, right click to bring up the drop down menu and click "Mesh Edit>Create Custom Mesh"
  2. The new mesh will now be sitting in the middle of the scene view.
A new mesh in the scene view
Whenever a MeshEdit object is selected, a new window will pop up in the top-left corner of the screen. This window is the MeshEdit Interface, it will give you some additional tools to modify your mesh. The new window has a series of "modes" that you can switch between using the drop-down menu in the far top-left corner of the interface. Each of these modes lets you edit a different aspect of your model:

Creating a tileset

Tilesets are a combination of textures and animations that have been smashed together into a single, simplified texture for your model. You must create a tileset before you can texture any of your models.

Before you start

The tileset folder, place all the textures and animations for your tileset here
To create a tileset, you'll need at least one texture and if you want, a few spritesheets for animations. The Tileset window will take these textures and compile them into a single texture page but first, your textures need to be formatted in a specific way.
Fortunately, MeshEdit contains a custom importer that will do this for you, as long as your textures have been placed in the correct folder. Make sure that when you bring your textures and animations into Unity, that you put them in the "Assets/Resources/Tilesets/" folder.
Textures and spritesheets that aren't in this folder can't be read by the tileset creator, unless you've specifically set their "isReadable" property to "true."

The "Tilesets" window

The "Tilesets" window
Now that you have your textures in the right folder, you're all set to create a new tileset:
  1. Open the window by clicking on "Windows>Tilesets" in the menu
  2. To create a new tileset, hit the "+ New Tileset" button
  3. Fill in all the boxes to define your tileset:
    • File Name is the name of the tileset, make sure it's unique to the other tilesets before you apply any changes!
    • Tile Width and Tile Height refer to the size of each tile. This should be the size of the tiles in the textures and the same size as each frame of the animations that you're giving to the tileset.
    • Tile Spacing defines the amount of outline you want to add to each tile in the tileset, this helps get rid of visual issues on the textured Mesh.
    • Textures is the list of 2D textures used to make the tileset.
    • Animations is the list of spritesheets that are used to create specific, animated tiles in your tileset.
    • Page Size (the little label at the bottom of the window) shows the final size of your tileset. This is also the size of the final, compiled texture that your model will use. This value cannot be changed without adding/removing textures or animations from your tileset.
  4. Apply changes. No changes are saved until you hit this button! This will save your new tileset and make it available to use in the "Tile Edit" mode of the MeshEdit interface. If you ever edit a texture that's used by your tileset, just hit "Re-Apply" changes to update the tileset, otherwise your changes won't show up.
Once the changes have been applied, the tileset manager will combine all the textures and animations into a single texture that can be found in "Assets/Resources/Tilesets/Constructed/." This texture will be applied to your models automatically when you use MeshEdit's tile editor.
And that's all there is to it! All the tilesets you've created will appear in the drop-down menu of MeshEdit's "Tile Edit" mode. Once you get bored of a tileset, you can just delete it using the "-Delete Tileset" button, but be careful! There's no saving the UV data on a model if the tileset is still being used somewhere in your game.

The Default mode

The Default edit mode
The default edit mode! There's nothing much to see here, the default mode gives you all the standard controls of a Unity Gameobject without letting MeshEdit get in the way.

The Mesh Edit mode

The Mesh Edit mode
Here's where the fun happens! This is one of the MeshEdit's main modes. From here you have complete control over your model, you can transform, extrude, delete and cut faces, you can create primitives and you can fine tune your model to fit neatly into your game.

Selecting parts of the mesh

Selecting verts/faces with the Right Mouse Button
Before you can transform the mesh, you need to select the area you want to modify. For more ways to select parts of your mesh you have the following options:

Modifying the mesh

Selecting a face, moving it, scaling it, rotating it and extruding it
While you have any verts/faces selected, you can modify them using shortcuts on you keyboard. MeshEdit works mostly through the keyboard and has no buttons on the interface to replace these functions.
First, select a group of vertices, then hit any of the following keys on your keyboard:
  • Hit G to move the selected vertices and faces with the mouse.
  • Hit R to rotate the selected verts/faces.
  • Hit S to scale the selected verts/faces.
  • Hit E to extrude the selected verts/faces.
While you're in the middle of a transformation you can use the following keys to make your changes more precise:
  • X, Y or Z to constrain your transformation to a single axis
  • Shift+X, Y or Z constrains your transformation to only the other two axes
  • Holding CTRL/CMD will snap your changes to the nearest unit
  • Holding Shift+CTRL/CMD will snap your changes to a finer degree
Applying a loop-cut to a mesh that's been made transparent with Z
Now that you know the basics you can start to edit your mesh a bit more:
  • Loop Cuts can be made by pressing Shift+R and moving your mouse around the mesh to find the right spot to cut. While finding where to cut the mesh you can use the scroll wheel to increase/decrease the number of cuts you want to make. Once you've found the right spot click with LMB to make the cut. To exit loop-cut mode without making any cuts, click RMB.
  • Delete selected faces by hitting Del in face-select mode.
  • Dissolve the selected vertices by hitting Del in vert-select mode. This will attempt to dissolve the selected verts into the mesh, any verts that cannot be dissolved will be deleted.
  • Flip Faces by hitting F in face-select mode. This will change the direction of the face normal.
  • Create Faces by hitting F in vert-select mode. Since you can only create quads with MeshEdit, exactly four vertices must be selected first but you can also create a face when only two or three verts are selected if there is a free space for a face to be added.
  • Resaddle all selected faces by pressing D. This will rearrange the triangles in a face so that they fold in the opposite direction. This is useful for making fine edits to a mesh and for making sure textures and vertex colours display correctly on a certain face.
For the full list of ways to edit a mesh, see the Shortcuts section at the end of this tutorial.

The Tile Edit mode

The Tile Edit mode is where all the texturing magic happens! Here you can select which tileset your model will use and paint tiles directly onto your model's faces.
Before you can start texturing your mesh with tiles, you'll need to have a tileset ready. If you haven't made one yet, follow the steps in the Creating a tileset section to get started.

Painting with tiles

The Tile Edit mode
Using the drop-down list in the interface, you can select one of the tilesets you created earlier. From here you can select the tile you want to paint with in the tile-picker. Once a tile is selected left click any face on your model and the tile will apply itself to the face. Tiles always apply themselves upright relative to the camera but you can change this with the Q and E keys, which will rotate the angle of the tile by 90 degrees in either direction. The black arrow in the MeshEdit interface shows the current tile direction.
To speed up the process of tiling a mesh, you can use W, A, S and D to change the selected tile to the adjacent tile on your tileset.

More UV control

A model textured using a small UV map inside a single tile
Below the tile-picker you'll find a nifty little interface where the tile you selected has been blown up to full size. Click & drag any edge or corner of this square to change the UV-shape you'll paint the mesh with. This is extremely helpful when you want to UV small details or weird shapes.
  • Reset restores the UV shape to it's default size.
  • Use custom UVs toggles whether the tile painter uses the custom UV shape when applying a tile to the mesh.
  • Snap to Pixels will ensure that the UV shape always aligns to the pixels on the tileset.
  • Move UVs rotates the points of your UV shape 90 degrees in either direction, but the UVs remain upright.

Imported meshes

If you imported your mesh from an .obj file, this interface will not appear. This is because the UV coordinates created using tilesets are calculated differently than they are in other modelling programs. To convert the imported model's UVs, you just need to hit the "Convert to Tileset" button, but beware! You won't be able to get the original UV map back!

The Vertex Colour mode

A basic mesh with coloured faces and vertices
The Vertex Colouring mode lets you set the vertex colours of your mesh. You can also paint entire faces instead of vertices without the colour blending into the neighbouring areas.
  • Paint Mode decides whether you're painting the verts or the faces of your mesh. You can toggle this with "CTRL/CMD+Tab."
  • Paint Colour is the colour you paint with.
  • The area below the paint colour is the paint history. This shows the last 20 unique colours that you used. Clicking any of the colours in this palette will set it as the current paint colour.
Use the colour picker to choose the colour you want to paint with. Then, using the left mouse button you can apply that colour to any verts or faces covered by the circular brush around the mouse. For more control you can use the scroll wheel to increase/decrease the size of the brush.
Using face and vert painting to add more detail to a model
If you want to get more interesting results using vertex colours, you can modify the shader that your model uses. The examples shown here use a shader with the standard, additive-blend colour mode.

List of shortcuts

Shortcuts used in all edit modes

Tab
Shift+Tab
Numpad 7
Numpad 1
Numpad 3
Numpad 5
Switches to the next edit mode
Switches to the previous edit mode
Shows the model from above, hit it again to view the model from the opposite side
Shows the model from the front, hit it again to view the model from the opposite side
Shows the model from the side, hit it again to view the model from the opposite side
Toggles between perspective and orthographic view

Shortcuts used in Mesh Edit mode

hello
RMB
Shift+RMB
CTRL/CMD+Tab
Alt+RMB
Alt+Shift+RMB
A
L
C
Z
Shift+R
hello
G
R
S
E
hello
LMB
RMB
X, Y, Z
CTRL/CMD
Shift+CTRL/CMD
hello
LMB
MMB
RMB
Scroll
hello
LMB
RMB
Scroll
hello
Del
F
hello
Del
F
D
hello
CTRL/CMD+C
CTRL/CMD+V
CTRL/CMD+X
Selection
Selects the nearest vert/face
Adds the nearest vert/face to the selection
Toggles the selection mode between vertex select and face select
Selects a vert or face loop
Adds a vert/face loop to the selection
Selects/Deselects all verts/faces
Selects a section of unbroken faces on the mesh, starting from the first face under the mouse
Activates circle-selection
Toggles whether the mesh is transparent or opaque
Activates loop-cut mode
Modify the selection
Moves the selected verts
Rotates the selected verts around their center
Scales the selected verts
Extrudes the selection
While Moving/Rotating/Scaling a selection
Commits the change to the model
Cancels the transformation
Sets the axis that the current transform follows
Snaps the current transform to the nearest value
Finely snaps the current transform to the nearest value
Circle-Selection mode
Selects all verts/faces in the selection area
Deselects all verts/faces in the selection area
Exits circle-selection mode
Changes the size of the circle-selection area
Loop-Cut mode
Cuts the mesh
Cancels loop-cut
Changes the number of cuts
Vert-Select mode
Attempts to dissolve the selected verts into the mesh and deletes all verts that can't be dissolved
Attempts to create a face between the selected verts, works best when four vertices are selected
Face-Select mode
Deletes the selected faces
Flips the direction of the selected faces
Changes the saddling direction of the selected faces
Other
Copies all selected faces to the clipboard
Pastes faces from the clipboard onto your mesh
Deletes the selected faces and adds their data to the clipboard

Shortcuts used in Tile Edit mode

LMB
CTRL+LMB
ALT+LMB
W, A, S, D
Q, E
Paints the selected quad with the selected tile and UV information
Retrieves the UV shape that was used to texture the selected quad and copies it to the UV editor
Finds the approximate shape of the selected quad and copies it to the UV editor
Changes the selected tile
Changes the orientation of a tile when applied to a face

Shortcuts used in Vertex Colouring mode

LMB
MMB
Shift+Scroll
CTRL/CMD+Tab
Paints the selected vert/face
Erases the colour on the selected vert/face
Change the size of the paintbrush
Toggles the paint mode between vertex and face painting

Issues and limitations

MeshEdit is a limited modelling tool, it's designed to let you work quickly so there are some features that it does not have. The two main limitations of MeshEdit are:
  1. You can only create quads. There is no way to create a single triangle, or a poly. There are workarounds for most cases, but it may take some getting used to based on your modelling style.
  2. Some operations will run slowly when your models grow too large. Models over 1000 faces may cause lag when some intensive operations are used.

Other

Thanks for taking the time to read the guide and for supporting the tool! I hope Mesh Edit will help you with whatever amazing projects you're working on.
If you find a bug or think of an incredible new feature you'd like to see, feel free to leave me a message on Twitter, or email me at "rollojamie@gmail.com." And if you make anything neat with the tool, I'd love to see it!
All the best - Jamie